CPPFLAGS= -g -c -Wall 

OBJS= connection.o packet.o packet_filter.o packet_quer.o\
	   	posix_thread.o
dpdetect : $(OBJS)
	g++ -o dpdetect $(OBJS) -lpcap -lpthread

clean:
	rm dpdetect *.o

connection.o : connection.c++ connection.h packet.h
	g++ $(CPPFLAGS) connection.c++ -I.
packet.o: packet.c++ packet.h
	g++  $(CPPFLAGS) packet.c++ -I.
packet_filter.o : packet_filter.c++ packet_filter.h packet.h packet_quer.h posix_thread.h
	g++  $(CPPFLAGS) packet_filter.c++ -I.
packet_quer.o : packet_quer.c++ packet_quer.h
	g++  $(CPPFLAGS) packet_quer.c++ -I.
posix_thread.o : posix_thread.c++ posix_thread.h 
	g++  $(CPPFLAGS) posix_thread.c++ -I.


